package com.zeei.ems.meet.model;

import com.zeei.ems.base.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(value = "MeetingRecordVO", description = "会议记录实体类")
public class MeetingRecordVO {
    /**
     * 会议流水号
     */
    @ApiModelProperty(name = "id", value = "会议流水号")
    private Integer id;

    /**
     * 会议UUid：阿里会议创建返回
     */
    @ApiModelProperty(name = "meetingUUID", value = "会议UUid：阿里会议创建返回")
    private String meetingUUID;

    /**
     * 会议编码：阿里会议返回
     */
    @ApiModelProperty(name = "meetingCode", value = "会议编码：阿里会议返回")
    private String meetingCode;

    /**
     * 会议主题
     */
    @ApiModelProperty(name = "meetingName", value = "会议主题")
    private String meetingName;

    /**
     * 会议密钥
     */
    @ApiModelProperty(name = "password", value = "会议密钥")
    private String password;

    /**
     * 会议是否加密，0 不加密 1 加密
     */
    private Integer openPasswordFlag;

    /**
     * 开始时间
     */
    @ApiModelProperty(name = "startTime", value = "开始时间")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(name = "endTime", value = "结束时间")
    private Date endTime;

    /**
     * 会议创建人
     */
    @ApiModelProperty(name = "userId", value = "会议创建人")
    private Integer userId;

    /**
     * 入会人员id集合，多个逗号分割
     */
    @ApiModelProperty(name = "meetingJoiners", value = "入会人员id集合，多个逗号分割")
    private String meetingJoiners;

    /**
     * 会议状态 0 未开始；1 已完成
     */
    @ApiModelProperty(name = "meetingStatus", value = "会议状态 0 未开始；1 已完成")
    private Integer meetingStatus;

    /**
     * 会议录屏文件地址
     */
    @ApiModelProperty(name = "recordPath", value = "会议录屏文件地址")
    private String recordPath;

    /**
     * 创建时间
     */
    @ApiModelProperty(name = "createTime", value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(name = "updateTime", value = "更新时间")
    private Date updateTime;

    public Integer getOpenPasswordFlag(){
        return StringUtil.isNotEmpty(this.password) ? 1 : 0;
    }
}
